
<extend name="public:base" />
<block name="breadcrumb">
    <ul class="breadcrumb">
        <li>
            <i class="ace-icon fa fa-book"></i>
            <a href="index">{:L('数据库管理')}</a>
        </li>
        <li class="active">{:L('数据库备份')}</li>
    </ul>
</block>
<block name="c-block">
    <div class="main-content">
            <!-- #section:settings.box -->

            <!-- /.ace-settings-container -->

            <!-- /section:settings.box -->
            <div class="page-content-area">

                <div class="page-header">
                    <h1>
                        数据库管理            <small>
                        <i class="ace-icon fa fa-angle-double-right"></i>
                        数据库备份            </small>
                        <!-- <ul class="nav navbar-nav navbar-right">
                            <button class="btn btn-sm btn-primary" onclick="openDialog('{:U('adminAdd')}', '新增用户');">
                                <i class="fa fa-plus"></i> 新增用户 </button>
                        </ul> -->
                    </h1>

                </div>

                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <div class="table-header">
                            数据库中共有<i class="count">{:count($lists)} </i>张表，共计<i class="size">{$total|format_bytes}</i>　　
                            <a href="javascript:void(0)" id="backUp" data-action="{:url('backup')}" class=" btn btn-xs btn-success more-checkbox delete">备份</a>
                        </div>    
                        <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                            <thead>
                            <tr>
                                <th width="10">
                                    <label class="pos-rel">
                                        <input type="checkbox" class="ace all-checkbox">
                                        <span class="lbl"></span>
                                    </label>
                                </th>
                                <th>数据库表</th>
                                <th>记录条数</th>
                                <th>占用空间</th>
                                <th>类型</th>
                                <th>编码</th>
                                <th>创建时间</th>
                                <th>说明</th>
                                <th class="text-right">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <volist name="lists" id="vo" empty="暂没相关数据">
                                <tr id="id_{$vo.id}">
                                    <td>
                                        <label class="pos-rel">
                                            <input type="checkbox" value="{$vo['Name']}" class="ace checkbox">
                                            <span class="lbl"></span>
                                        </label>
                                    </td>
                                    <td>{$vo['Name']}</td>
                                    <td >{$vo['Rows']}</td>
                                    <td>{$vo['size']}</td>
                                    <td >{$vo['Engine']}</td>
                                    <td >{$vo['Collation']}</td>
                                    <td >{$vo['Create_time']}</td>
                                    <td >{$vo['Comment']|default="--"}</td>
                                    <td class="text-right">
                                        
                                        <button class="btn btn-xs btn-info delete" data-action="{:U('optimize',['tableName'=>$vo['Name']])}">
                                            <i class="ace-icon fa fa-pencil bigger-120"></i> 优化
                                        </button>
                                        <button class="btn btn-xs btn-danger delete confirm" data-rel="确定修复吗?" data-action="{:U('repair',['tableName'=>$vo['Name']])}">
                                            <i class="ace-icon fa fa-check bigger-120"></i> 修复
                                        </button>
                                    </td>
                                </tr>
                            </volist>
                            
                            </tbody>
                        </table>
                        <!-- PAGE CONTENT ENDS -->
                    </div>
                    <!-- /.col -->
                </div>
                <!-- /.row -->
            </div>
            <!-- /.page-content-area -->
    </div>
</block>
